package com.hxd.tabactivityfragment.util

import com.xuexiang.xui.widget.banner.widget.banner.BannerItem

/**
 *  项目名：    FoodOrigins
 *  包名：      com.hxd.tabactivityfragment.util
 *  文件名:     BannerDataUtil
 *  创建者:     HXD
 *  创建时间:   2019/3/24 14:38
 *  描述:       TODO
 */

class BannerDataUtil {
    companion object {
        //初始化图片
        open var urls = arrayOf(
            "https://cdn.8btc.com/wp-content/uploads/2016/03/QQ%E6%88%AA%E5%9B%BE20160318180953.png",
            "https://cdn.8btc.com/wp-content/uploads/2015/01/112.png",
            "https://cdn.8btc.com/wp-content/uploads/2015/01/IBM-Samsung-Adept.jpg",
            "https://cdn.8btc.com/wp-content/uploads/2016/03/%E6%AF%94%E7%89%B9%E4%BF%A1%EF%BC%88Bitmessage%EF%BC%89.jpg",
            "https://cdn.8btc.com/wp-content/uploads/2016/12/purse.jpg"
        )

        //初始化标题
        open var titles = arrayOf(
            "银行业之后，区块链又要颠覆物联网",
            "如何让几十亿物联网设备加入比特币网络？",
            "IBM联合三星：利用以太坊协议打造去中心化的物联网Adept",
            "“棱镜杀手”比特信（Bitmessage）火起来了",
            "亚马逊商品享受15%折扣，Purse联合Coinsecure让比特币在印度使用更广"
        )

        //初始化链接
        open var clickArray = arrayOf(
            "https://www.8btc.com/article/83759",
            "https://www.8btc.com/article/44129",
            "https://www.8btc.com/article/43179",
            "https://www.8btc.com/article/83793",
            "https://www.8btc.com/article/113331"
        )

        fun getDatas():ArrayList<BannerItem>{
            var datas:ArrayList<BannerItem> = ArrayList()
            for (i in urls.indices) {
                val item = BannerItem()
                item.imgUrl = urls[i]
                item.title = titles[i]
                datas.add(item)
            }
            return datas
        }

        fun getMiklDatas():ArrayList<BannerItem>{

            var urls = arrayOf(
                "https://gss3.bdstatic.com/7Po3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike150%2C5%2C5%2C150%2C50/sign=e8ea2d457c1ed21b6dc426b7cc07b6a1/79f0f736afc37931652b3a9eeac4b74542a911c1.jpg",
                "https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=d&word=%E5%A5%B6%E6%BA%90%E5%9B%BE%E7%89%87&hs=2&pn=5&spn=0&di=10560&pi=0&rn=1&tn=baiduimagedetail&is=0%2C0&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=3901294544%2C2911129338&os=1625262836%2C44421562&simid=3378887137%2C210640586&adpicid=0&lpn=0&ln=30&fr=ala&fm=&sme=&cg=&bdtype=0&oriquery=%E5%A5%B6%E6%BA%90%E5%9B%BE%E7%89%87&objurl=http%3A%2F%2Fphotocdn.sohu.com%2F20120601%2FImg344628812.jpg&fromurl=ippr_z2C%24qAzdH3FAzdH3F65ss_z%26e3Bf5i7_z%26e3Bv54AzdH3Fda8dama8AzdH3Fgn99mdb0lm_z%26e3Bfip4s&gsm=0&islist=&querylist=",
                "http://brand.baobei360.com/upfile/news/201807/201807310950588024_500x321.png"
            )

            var imgUrl = arrayOf(
                "https://baike.baidu.com/pic/%E9%BB%84%E9%87%91%E5%A5%B6%E6%BA%90%E5%B8%A6/5131656/0/79f0f736afc37931652b3a9eeac4b74542a911c1?fr=lemma&ct=single#aid=0&pic=79f0f736afc37931652b3a9eeac4b74542a911c1",
                "https://www.bangli.uk/post/31385",
                "http://brand.baobei360.com/a/20180731/10008248.html"
            )

            var title = arrayOf(
                "黄金奶源带",
                "爱尔兰牧场",
                "新西兰黄金奶源地"
            )


            var datas:ArrayList<BannerItem> = ArrayList()
            for (i in urls.indices) {
                val item = BannerItem()
                item.imgUrl = urls[i]
                item.title = titles[i]
                datas.add(item)
            }
            return datas
        }

        fun getProductDatas():ArrayList<BannerItem>{

            var urls = arrayOf(
                "https://gss3.bdstatic.com/7Po3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike150%2C5%2C5%2C150%2C50/sign=e8ea2d457c1ed21b6dc426b7cc07b6a1/79f0f736afc37931652b3a9eeac4b74542a911c1.jpg",
                "https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=d&word=%E5%A5%B6%E6%BA%90%E5%9B%BE%E7%89%87&hs=2&pn=5&spn=0&di=10560&pi=0&rn=1&tn=baiduimagedetail&is=0%2C0&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=3901294544%2C2911129338&os=1625262836%2C44421562&simid=3378887137%2C210640586&adpicid=0&lpn=0&ln=30&fr=ala&fm=&sme=&cg=&bdtype=0&oriquery=%E5%A5%B6%E6%BA%90%E5%9B%BE%E7%89%87&objurl=http%3A%2F%2Fphotocdn.sohu.com%2F20120601%2FImg344628812.jpg&fromurl=ippr_z2C%24qAzdH3FAzdH3F65ss_z%26e3Bf5i7_z%26e3Bv54AzdH3Fda8dama8AzdH3Fgn99mdb0lm_z%26e3Bfip4s&gsm=0&islist=&querylist=",
                "http://brand.baobei360.com/upfile/news/201807/201807310950588024_500x321.png"
            )

            var imgUrl = arrayOf(
                "https://baike.baidu.com/pic/%E9%BB%84%E9%87%91%E5%A5%B6%E6%BA%90%E5%B8%A6/5131656/0/79f0f736afc37931652b3a9eeac4b74542a911c1?fr=lemma&ct=single#aid=0&pic=79f0f736afc37931652b3a9eeac4b74542a911c1",
                "https://www.bangli.uk/post/31385",
                "http://brand.baobei360.com/a/20180731/10008248.html"
            )

            var title = arrayOf(
                "黄金奶源带",
                "爱尔兰牧场",
                "新西兰黄金奶源地"
            )


            var datas:ArrayList<BannerItem> = ArrayList()
            for (i in urls.indices) {
                val item = BannerItem()
                item.imgUrl = urls[i]
                item.title = titles[i]
                datas.add(item)
            }
            return datas
        }
    }
}